import request from './request'
let userid=''
if(localStorage.getItem('userInfo')==null){
    userid=''
}else{
    userid=JSON.parse(localStorage.getItem('userInfo')).userId
}
//删除博客
export function delete_(params){
    return request({
        url:'/api/blog',
        method: 'DELETE',
        data:{
            id:params.id,
            state:params.state
        },
        headers: {
            'api-type': 1,
            'userid':userid,
          },
    })
}
// 恢复博客
export function recover_(id){
    return request({
        url:'/api/blog/restore',
        method:'PUT',
        data:{
            id:id
        },
        headers: {
            'api-type': 1,
            'userid':userid,
          },
    })
}